package com.bms.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.bms.dao.AppFileDao;
import com.bms.entity.AppFile;

/**
 * Dao实现类 - 站点文件
 * @author Lan
 */
@Repository
public class AppFileDaoImpl extends BaseDaoImpl<AppFile, String> implements AppFileDao {

	@SuppressWarnings("unchecked")
	public boolean hasSenstWords(String appEnglishName) {
		String hql = "from AppFile where appEngName = ? and senstWords != ?";
		List list = getSession().createQuery(hql).setParameter(0, appEnglishName).setParameter(1, "-").list();
		if(list != null && list.size() > 0)
			return true;
		else
			return false;
	}

	
	@SuppressWarnings("unchecked")
	public List<Integer> getAllAuditLevel(String appEnglishName) {
		String hql = "select distinct fileStatus from AppFile where appEngName = ?";
		return getSession().createQuery(hql).setParameter(0, appEnglishName).list();
	}
	
}